package com.shyb.lingxian.mine.activity;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;

import com.shyb.lingxian.R;
import com.shyb.lingxian.Util.ToastUtil;
import com.shyb.lingxian.base.BaseActivity;
import com.shyb.lingxian.mine.presenter.FanKuiPresenter;
import com.shyb.lingxian.mine.view.FanKuiView;

/**
 * Created by gs on 2018/3/26.
 */

public class FanKuiActivity extends BaseActivity<FanKuiPresenter> implements View.OnClickListener,FanKuiView{

    private Button fankui_up;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_fankui);

        initHeadTitle("意见反馈");

        findViews();
    }

    private void findViews() {
        fankui_up = (Button) findViewById(R.id.fankui_up);

        fankui_up.setOnClickListener(this);

        ((ImageView)findViewById(R.id.iv_head_left)).setOnClickListener(this);
    }

    @Override
    protected FanKuiPresenter initPresenter() {
        return new FanKuiPresenter(this);
    }

    @Override
    protected void initialize() {


    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.fankui_up:
                // TODO: 2018/3/26 反馈建议还没有做限制

                break;

            case R.id.iv_head_left:
                onBackPressed();
                break;
        }
    }

    @Override
    public void onError(String message) {
        ToastUtil.showToast(this,message);
    }
}
